<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  class User {};
  class Admin extends User {};
  class Son extends Admin {};

  let hd = new Son();
  // 通过isPrototypeOf来判断对象的继承关系
  console.log(Son.prototype.isPrototypeOf(hd));
  console.log(Admin.prototype.isPrototypeOf(hd));
  console.log(User.prototype.isPrototypeOf(hd));
</script>

</html>